\(\int (a+b \arctan (c+d x)) \, dx\) [27]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 38 \[ \int (a+b \arctan (c+d x)) \, dx=a x+\frac {b (c+d x) \arctan (c+d x)}{d}-\frac {b \log \left (1+(c+d x)^2\right )}{2 d} \]

[Out]

a*x+b*(d*x+c)*arctan(d*x+c)/d-1/2*b*ln(1+(d*x+c)^2)/d

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {5147, 4930, 266} \[ \int (a+b \arctan (c+d x)) \, dx=a x+\frac {b (c+d x) \arctan (c+d x)}{d}-\frac {b \log \left ((c+d x)^2+1\right )}{2 d} \]

[In]

Int[a + b*ArcTan[c + d*x],x]

[Out]

a*x + (b*(c + d*x)*ArcTan[c + d*x])/d - (b*Log[1 + (c + d*x)^2])/(2*d)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4930

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x^n])^p, x] - Dist[b*c
*n*p, Int[x^n*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0
] && (EqQ[n, 1] || EqQ[p, 1])

Rule 5147

Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Dist[1/d, Subst[Int[(a + b*ArcTan[x])^p, x],
 x, c + d*x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = a x+b \int \arctan (c+d x) \, dx \\ & = a x+\frac {b \text {Subst}(\int \arctan (x) \, dx,x,c+d x)}{d} \\ & = a x+\frac {b (c+d x) \arctan (c+d x)}{d}-\frac {b \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d} \\ & = a x+\frac {b (c+d x) \arctan (c+d x)}{d}-\frac {b \log \left (1+(c+d x)^2\right )}{2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.29 \[ \int (a+b \arctan (c+d x)) \, dx=a x+b x \arctan (c+d x)-\frac {b \left (-2 c \arctan (c+d x)+\log \left (1+c^2+2 c d x+d^2 x^2\right )\right )}{2 d} \]

[In]

Integrate[a + b*ArcTan[c + d*x],x]

[Out]

a*x + b*x*ArcTan[c + d*x] - (b*(-2*c*ArcTan[c + d*x] + Log[1 + c^2 + 2*c*d*x + d^2*x^2]))/(2*d)

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.92

method result size
default \(a x +\frac {b \left (\left (d x +c \right ) \arctan \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{d}\) \(35\)
parts \(a x +\frac {b \left (\left (d x +c \right ) \arctan \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{d}\) \(35\)
derivativedivides \(\frac {\left (d x +c \right ) a +b \left (\left (d x +c \right ) \arctan \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{d}\) \(40\)
parallelrisch \(-\frac {b \left (-2 \arctan \left (d x +c \right ) x \,d^{2}-2 c \arctan \left (d x +c \right ) d +\ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) d \right )}{2 d^{2}}+a x\) \(54\)
risch \(a x -\frac {i b x \ln \left (1+i \left (d x +c \right )\right )}{2}+\frac {i b x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {b c \arctan \left (d x +c \right )}{d}-\frac {b \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d}\) \(73\)

[In]

int(a+b*arctan(d*x+c),x,method=_RETURNVERBOSE)

[Out]

a*x+b/d*((d*x+c)*arctan(d*x+c)-1/2*ln(1+(d*x+c)^2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.26 \[ \int (a+b \arctan (c+d x)) \, dx=\frac {2 \, a d x + 2 \, {\left (b d x + b c\right )} \arctan \left (d x + c\right ) - b \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{2 \, d} \]

[In]

integrate(a+b*arctan(d*x+c),x, algorithm="fricas")

[Out]

1/2*(2*a*d*x + 2*(b*d*x + b*c)*arctan(d*x + c) - b*log(d^2*x^2 + 2*c*d*x + c^2 + 1))/d

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.34 \[ \int (a+b \arctan (c+d x)) \, dx=a x + b \left (\begin {cases} \frac {c \operatorname {atan}{\left (c + d x \right )}}{d} + x \operatorname {atan}{\left (c + d x \right )} - \frac {\log {\left (c^{2} + 2 c d x + d^{2} x^{2} + 1 \right )}}{2 d} & \text {for}\: d \neq 0 \\x \operatorname {atan}{\left (c \right )} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate(a+b*atan(d*x+c),x)

[Out]

a*x + b*Piecewise((c*atan(c + d*x)/d + x*atan(c + d*x) - log(c**2 + 2*c*d*x + d**2*x**2 + 1)/(2*d), Ne(d, 0)),
 (x*atan(c), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.95 \[ \int (a+b \arctan (c+d x)) \, dx=a x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b}{2 \, d} \]

[In]

integrate(a+b*arctan(d*x+c),x, algorithm="maxima")

[Out]

a*x + 1/2*(2*(d*x + c)*arctan(d*x + c) - log((d*x + c)^2 + 1))*b/d

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.95 \[ \int (a+b \arctan (c+d x)) \, dx=a x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b}{2 \, d} \]

[In]

integrate(a+b*arctan(d*x+c),x, algorithm="giac")

[Out]

a*x + 1/2*(2*(d*x + c)*arctan(d*x + c) - log((d*x + c)^2 + 1))*b/d

Mupad [B] (verification not implemented)

Time = 1.17 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.29 \[ \int (a+b \arctan (c+d x)) \, dx=a\,x+b\,x\,\mathrm {atan}\left (c+d\,x\right )-\frac {b\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d}+\frac {b\,c\,\mathrm {atan}\left (c+d\,x\right )}{d} \]

[In]

int(a + b*atan(c + d*x),x)

[Out]

a*x + b*x*atan(c + d*x) - (b*log(c^2 + d^2*x^2 + 2*c*d*x + 1))/(2*d) + (b*c*atan(c + d*x))/d